layui.use(['table','form','laydate'],function(){
    var table = layui.table;
    var laydate = layui.laydate;


    table.render({
        elem: '#questionList',
        url: '/question/questionList',
        method: 'post',
        title: '问卷列表',
        toolbar:'toolbarQuestion',
        cols: [[
            {field:'auto',type:'numbers', title: '序号', width:'6%',unresize: true, sort: true, align: 'center'},
            {field:'username',title: '用户', width:'10%', align: 'center'},
            {filed:'opinion', title: '意见' ,width:'25%', align: 'center',templet:'#opinionTpl'},
            {field:'func',title: '功能', width:'6%', align: 'center',templet:'#funcTpl'},
            {field:'operation',title: '操作', width:'6%', align: 'center',templet:'#operationTpl'},
            {field:'human',title: '人性化', width:'8%', align: 'center',templet:'#humanTpl'},
            {field:'response',title: '响应', width:'6%', align: 'center',templet:'#responseTpl'},
            {filed:'share', title: '分享' ,width:'6%', align: 'center',templet:'#shareTpl'},
            {filed:'fluency', title: '流畅' ,width:'6%', align: 'center',templet:'#fluencyTpl'},
            {filed:'satisfy', title: '需求' ,width:'6%', align: 'center',templet:'#satisfyTpl'},
            {filed:'total', title: '总体' ,width:'6%', align: 'center',templet:'#totalTpl'},
            {filed:'attitude', title: '态度' ,width:'8%', align: 'center',templet:'#attitudeTpl'}
        ]],
        id: 'questionTabReload',
        page: true
    });


// 头工具栏监听事件
    table.on('toolbar(questionList)',function(obj){
        if(obj.event == 'refresh'){
            table.reload('questionTabReload');
        }
    });

});